package com.zhaochao.example;

import jakarta.validation.Valid;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;


@Slf4j
@RestController
@RequestMapping("/user")
public class UserController {

    @PostMapping("/notice")
    public Map<String, Object> save(@RequestBody @Valid UserNotice user) {
        return Map.of("code", 0, "data", user);
    }
}